<?php if (isset($items)): ?>
<?php if (sizeof($items) > 0): ?>
  <hr>
  <div class="row feature">
    <?php foreach ($items as $key => $item) : ?>
    <?php
    $field = field_get_items('lonex_features', $item, 'field_feature_link');
    if(isset($field[0])) {
      $link = $field[0]['value'];
    }
    ?>

    <?php if(isset($link)):?><a href="<?php print $link; ?>"><?php endif;?>
    <div class="navbar span4 row">
      <div class="navbar-inner">

        <div class="pull-left" style="width:39%; padding-top:10px">
          <span class="f-title"><?php print render($item->title); ?></span>
          <?php print render($item->description); ?>
        </div>

        <div class="span2 pull-right">
          <?php
          $image = array_shift(field_get_items('lonex_features', $item, 'field_image'));
          $filename = file_create_url($image['uri']);
          ?>

          <img class="pull-right" src="<?php print $filename; ?>"><br>
        </div>

      </div>
    </div>
    <?php if(isset($link)):?></a><?php endif;?>

    <?php endforeach; ?>
  </div>
  <?php endif; ?>
<?php endif; ?>

